import { defineStore } from 'pinia'
import { ref } from 'vue'

const useWhichStore = defineStore('which', () => {

  const isShowHistory = ref<boolean>(true)
  const isShowWhich = ref<boolean>(false)

  // 显示/隐藏搜索出结果的页面
  const displayWhich = (value: boolean) => {
    isShowHistory.value = !value
    isShowWhich.value = value
  }


  return {
    isShowHistory,
    isShowWhich,
    displayWhich,
  }
})

export default useWhichStore